# price_strategy.py
from abc import ABC, abstractmethod

# 价格计算策略接口
class PriceStrategy(ABC):
    @abstractmethod
    def calculate_price(self, base_price: float) -> float:
        pass

# 普通用户：全价
class NormalUserPrice(PriceStrategy):
    def calculate_price(self, base_price: float) -> float:
        return base_price

# VIP 用户：5折
class VIPUserPrice(PriceStrategy):
    def calculate_price(self, base_price: float) -> float:
        return base_price * 0.5

# 金卡用户：8折
class GoldUserPrice(PriceStrategy):
    def calculate_price(self, base_price: float) -> float:
        return base_price * 0.8

# 银卡用户：9折
class SilverUserPrice(PriceStrategy):
    def calculate_price(self, base_price: float) -> float:
        return base_price * 0.9

